<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>APP</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/person_center_frame.css" />
</head>


<body>

    <ul class="aui-list aui-form-list" style="padding:0.1rem 0;margin:0.5rem 0">

        <li style="padding:0 1rem;margin:1rem 0;border:none;">

            <input id='old-password' type="password" placeholder="请输入旧密码" style="border:1px solid #ccc;text-align:center;border-radius:0.5rem;">
        </li>
        <li style="padding:0 1rem;margin:1rem 0;border:none;">

            <input id='new-password' type="password" placeholder="请输入新密码" style="border:1px solid #ccc;text-align:center;border-radius:0.5rem;">
        </li>

        <li style="padding:0 1rem;margin:1rem 0;border:none;">

            <input id='new-password1' type="password" placeholder="请再次输入密码" style="border:1px solid #ccc;text-align:center;border-radius:0.5rem;">
        </li>



    </ul>
    <div style="padding:0 1rem;margin:1.5rem 0;border:none;">
        <p style="color:#ff4285; line-height：2rem">温馨提示：</p>

        <p style="line-height：2rem">1.修改成功之后，请用新密码登陆。</p>
        <p style="line-height：2rem">2.建议采用字母+数字+特殊字符组合增加强度。</p>




    </div>
    <div class="" style="padding:0 1rem;margin:1.5rem 0;border:none;">
        <div tapmode onclick="fnSubmitData()" ; style="border-radius:0.6rem;border:1px solid #ccc;text-align:center;line-height:2.4rem;background:#ff4285;color:#fff;width:100%；">提交</div>
    </div>





</body>

<script id="interpolationtmpl" type="text/x-dot-template">


</script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript">
    apiready = function() {

initRefreshCommon();

    };



    function fnSubmitData() {

        var old_password = $("#old-password").val();
        var password = $("#new-password").val();
        var password1 = $("#new-password1").val();

        if(password!==password1){
          api.toast({
              msg: '两次密码输入的不相同',
              duration: 2000,
              location: 'middle'
          });
          return false;
        }


        fnGetDataCommon("callBack1", "index.php?m=api&c=appnew&a=update_pwd", "post", {
            old_password:old_password,
            password:password
        });
    }

    function callBack1Res(ret) {
        api.toast({
            msg: ret.msg,
            duration: 2000,
            location: 'middle'
        });
        $api.clearStorage();
        api.openWin({
            name: 'login',
            url: './login.html',
            pageParam: {
                name: 'test'
            }
        });

    }
</script>

</html>
